package com.yld.ch10;

import java.util.regex.Pattern;

public class RegClient {
	
	
	public static void main(String[] args) {
		
		
		
		// abcafyldsdfsdf
		
		
		//regex =  regular expression
		//在上面的这串字符串中是否有yld这个单词
		
		String content = "13926583118";
		 
		String pattern = ".*\\d{11}.*";
		 
		boolean isMatch = Pattern.matches(pattern, content);
		System.out.println("字符串中是否包含了 'yld' 子字符串? " + isMatch);
	}

}
